package com.flx.at.spring.code.aop;

import com.flx.at.spring.code.aop.calculate.Calculate;
import com.flx.at.spring.code.aop.calculate.Calculator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @Author Fenglixiong
 * @Create 2021/11/5 3:36
 * @Description
 **/
@Configuration
@EnableAspectJAutoProxy(proxyTargetClass = false)//proxyTargetClass=true使用cglib代理==false使用jdk动态代理
@ComponentScan(basePackages = "com.flx.at.spring.code.aop")
public class CalculateConfig {

    @Bean
    public Calculate calculate(){
        return new Calculator();
    }

}
